﻿using DailyPoetryH.Library.Services;

namespace DailyPoetryH.Library.Pages;

public partial class Index {
    protected override void OnAfterRender(bool firstRender) {
        if (!firstRender) {
            return;
        }

        if (!_poetryStorage.IsInitialized || !_favoriteStorage.IsInitialized) {
            _navigationService.NavigateTo(NavigationServiceConstants
                .InitializationPage);
        } else {
            _navigationService.NavigateTo(NavigationServiceConstants.TodayPage);
        }
    }
}